<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3" xmlns:head="http://www.w3.org/1999/html">
<head th:include="public/public_css::public_css ('盘点计划')" />

<link rel="stylesheet" type="text/css" th:href="@{/plugin/layui/css/font/iconfont.css}" media="all"/>
<link rel="stylesheet" type="text/css" th:href="@{/plugin/layui/js/layui/css/layui.css}" media="all"/>
<link rel="stylesheet" type="text/css" th:href="@{/css/main.css}" media="all"/>

<body style="background-color: #f2f2f2;">
<div class="layui-fluid larry-wrapper">
    <div class="layui-card">
        <div class="layui-row layui-col-space30">
            <div class="layui-col-xs24">
                <form class="layui-form layui-card-header  layui-card-header-auto" id="searchForm">
                    <input type="hidden" th:value="${pid}" id="pid" name="pid">
                </form>
                <!--列表-->
                <section class="panel panel-padding layui-card-body" >
                    <div class="pro">
                        <table id="table"  class="table text-nowrap" style="word-break:break-all; word-wrap:break-word;"></table>
                    </div>
                </section>
            </div>
        </div>
    </div>
</div>
<!--<div style="padding: 0px 15px;" hidden="hidden" id="xiafaRw">
    <div class="layui-row layui-col-space30">
        <div class="layui-col-xs24">
            <section class="panel panel-padding">
                <form id="form1" class="layui-form layui-form-pane" action="">
                    &nbsp;
                    <div class="layui-form-item">
                        <label class="layui-form-label"><font color="red" style="margin-right:10px">*</font>操作人员</label>
                        <div class="layui-input-block">
                            <input type="text" name="czry"  id="czry" required="required" jq-verify="required" jq-error="请输入操作人员" lay-verify="required" placeholder="操作人员" autocomplete="off" class="layui-input "/>
                        </div>
                    </div>
                    <div class="layui-form-item" style="float: right">
                        <div class="layui-input-block">
                            <button class="layui-btn" jq-filter="submit" lay-submit="" lay-filter="addCustomer">保存</button>
                            <button  class="layui-btn layui-btn-primary operateCancel">取消</button>
                        </div>
                    </div>
                </form>
            </section>
        </div>
    </div>
</div>-->




</body>


<script type="text/javascript" th:src="@{/plugin/layui/js/layui/layui.js}"></script>
<script type="text/javascript" th:src="@{/plugin/layui/js/version.js}"></script>
<script th:src="@{/plugin/layui/js/common.js}"></script>
<div th:include="public/public_js::public_js"></div>
<style type="text/css">

</style>
<script>
    //	回车查询
    document.onkeydown = function(event) {
        e = event ? event : (window.event ? window.event : null);
        if (e.keyCode == 13) {
            //执行的方法
            $('#search_button').click();
        }
    };
    layui.use(['list','layer','zzpUtils','jquery','laydate'],function () {
        window.operateEvent ={
            //预检
            "click .details":function (e, value, row, index) {//增加地址
                console.info("增加地址");
                details(row.id);
            },

        }

        var zzpUtils= layui.zzpUtils,
            $ = layui.jquery,
            layer=layui.layer,
            laydate = layui.laydate;



        var $table = zzpUtils.table({
            elem: '#table',
            isApi: true,
            pagination:true,
            url: '/wmsinventorymerge/list',
            columns: [{
                field: '',
                checkbox: true
            },{
                field: 'hpbh',
                title: '货品编号',
                width: 200
            },{
                field: 'hpmc',
                title: '货品名称',
                width:200
            },{
                field: 'kwmc',
                title: '库位名称'
            },{
                field: 'jhsl',
                title: '计划数量'
            },{
                field: 'pdsl',
                title: '盘点数量'
            },{
                field:'caozuo',
                title: '可用操作',
                events:operateEvent,
                formatter:operateFormatter
            }],
            queryParams: function () {//查询条件
                return  zzpUtils.getFormJson($("#searchForm"));
            },
            detailFormatter: function (row,index) {
                return "这里就没有确定过11";
            },
            /*onDblClickRow:function (row,index) {//双击展示

            }*/

        });

        function btn_cha(id) {
            var zzpUtils = layui.zzpUtils,
                $ = layui.jquery,
                laydate = layui.laydate;
            zzpUtils.dialog({
                title: "客户详情",
                type: 2,
                content: "/wmsCustomerFiles/toDetail?id=" + id,
                //设置dialog大小，也可以不设置，
            });

        }

        function operateFormatter(value, row, index) {
            return [
                '<a class="layui-btn layui-btn-xs layui-btn-radius layui-btn-warm details" >详细</a>'

            ].join('')
        }

        $(".inline-search-btn").on('click',function () {
            zzpUtils.refreshTable("#table");
        });


        function details(id){
            layer.open({
                type: 2,
                title:"详细信息",
                area: ['80%', '80%'],
                content: "/zxsswms/wmsInventoryplanRouter/toDetail?pdhbid=" + id
                ,cancel: function(){
                    //右上角关闭回调
                }
            });
        }
    });
</script>
</html>